<!DOCTYPE html>
<html>
<head>
	
	<title><?php echo _MANAGER_TITLE_; ?></title>

	<?php $this->setFlag('edit,vue'); ?>
	<?php $this->import('meta'); ?>

	<link rel="stylesheet" type="text/css" href="html/manager/account/css/operateset.css" />

    <script type="text/javascript" src="html/manager/account/js/operateset.js"></script>

</head>
<body style="background-color: #ececec;">

	<div id="operateBar" class="bg" style="display: none;">

		<input type="text" id="roleid" class="display-none" />
		<input type="text" id="roleName" class="display-none" />

		<div class="title-bar2">
			<div id="title" class="title-text">配置操作项</div>
			<div class="title-btn tc5" onclick="back()">关闭</div>
		</div>

		<div v-for="topMenu in list">
			<div class="title-bar50">{{ topMenu.name }}</div>

			<div class="rect" v-for="(leftParent,index) in topMenu.parent">
				<div class="title">
					<div class="order50">{{ index + 1 }}</div>
					<div class="text50">{{ leftParent.name }}</div>
				</div>
				<div class="tr50" v-for="leftChild in leftParent.child">
					<div class="field50">{{ leftChild.name }}</div>
					<div class="value50">
						<div v-bind:id="'operateItem' + operate.operateid" v-bind:class="leftChild.operateRole.includes('●' + operate.code + '●') ? 'operate-item-select' : 'operate-item'" v-for="operate in leftChild.operateMenu" v-on:click="setOperateItem($event, 'vue', operate.operateid, operate.menuid, operate.code, operate.name)">{{ operate.name }}</div>
					</div>
					<div style="display: none;">
						<div v-bind:id="'operateInfo' + operate.operateid" v-for="operate in leftChild.operateList">
							<input type="text" v-bind:id="'operateid' + operate.operateid" v-bind:value="operate.operateid" />
							<input type="text" v-bind:id="'menuid' + operate.operateid" v-bind:value="operate.menuid" />
							<input type="text" v-bind:id="'code' + operate.operateid" v-bind:value="operate.code" />
							<input type="text" v-bind:id="'name' + operate.operateid" v-bind:value="operate.name" />
						</div>
					</div>
				</div>
			</div>
		</div>

		<div>
			<div class="title-bar50">额外权限管理</div>

			<div class="rect">
				<div class="title">
					<div class="order50">1</div>
					<div class="text50">额外菜单</div>
				</div>
				<div class="tr50">
					<div class="field50">账户设置</div>
					<div class="value50">
						<div id="operateItemduty1689838063" v-bind:class="ownerRole.includes('●duty1689838063●') ? 'operate-item-select' : 'operate-item'" onclick="setOperateItem(this, 'js', 'duty1689838063', '', 'duty1689838063', '值班管理')">值班管理</div>
						<div id="operateItemwechat1689838063" v-bind:class="ownerRole.includes('●wechat1689838063●') ? 'operate-item-select' : 'operate-item'" onclick="setOperateItem(this, 'js', 'wechat1689838063', '', 'wechat1689838063', '微信绑定')">微信绑定</div>
					</div>
					<div style="display: none;">
						<div v-bind:id="'operateInfo' + operate.operateid" v-for="operate in ownerMenu">
							<input type="text" v-bind:id="'operateid' + operate.operateid" v-bind:value="operate.operateid" />
							<input type="text" v-bind:id="'menuid' + operate.operateid" v-bind:value="operate.menuid" />
							<input type="text" v-bind:id="'code' + operate.operateid" v-bind:value="operate.code" />
							<input type="text" v-bind:id="'name' + operate.operateid" v-bind:value="operate.name" />
						</div>
					</div>
				</div>
			</div>
		</div>

		<div class="button1" onclick="saveRoleOperate()">保存</div>

	</div>

	<script type="text/javascript">
		var operate = new Vue({
            el: '#operateBar',
            data: {
            	list: '',
            	ownerMenu: '',
            	ownerRole: ''
            }
        });
	</script>

</body>
</html>